Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Test files with Elasticsearch json logging #9988

Closed
wants to merge 6 commits into from

Conversation

pgomulka
Copy link
Contributor

es_docker_happy_startup.log - started from docker - successful
elasticsearch startup

es_docker_startup_and_deprecation.log - started from docker - log lines
containing successful startup (type main) mixed with log line of type
deprecation

es_docker_startup_bootstrap_fail.log - started from docker - log lines
from startup failing due to bootstrap fail (not a json in docker)

es_happy_startup.log - started from binary - successful elasticsearch
startup

es_deprecation.log - started from binary - contains a json log line with
type deprecation

es_startup_failure_boostrap.log - started from binary - elasticsearch
failing to start due to bootstrap failure

es_startup_shutdown_due_to_exception.log - logs from DieWithDignity
where elasticsearch fail to start due to exception

es_json_logs_tests.log - logs from a junit test - mix of logs with:

  • stacktrace with a cause
  • stacktrace with exception message as json
  • message with json
  • messages with multiple logger level

es_deprecation.log - started from binary - contains a json log line with
type deprecation

es_docker_happy_startup.log - started from docker - successful
elasticsearch startup

es_docker_startup_and_deprecation.log - started from docker - log lines
containing successful startup (type main) mixed with log line of type
deprecation

es_docker_startup_bootstrap_fail.log - started from docker - log lines
from startup failing due to bootstrap fail (not a json in docker)

es_happy_startup.log - started from binary - successful elasticsearch
startup

es_startup_failure_boostrap.log - started from binary - elasticsearch
failing to start due to bootstrap failure

es_startup_shutdown_due_to_exception.log - logs from DieWithDignity
where elasticsearch fail to start due to exception

es_json_logs_tests.log - logs from a junit test - mix of logs with:
- stacktrace with a cause
- stacktrace with exception message as json
- message with json
- messages with multiple logger level
@pgomulka pgomulka added in progress Pull request is currently in progress. Filebeat Filebeat labels Jan 10, 2019
@pgomulka pgomulka self-assigned this Jan 10, 2019
@pgomulka pgomulka requested a review from a team as a code owner January 10, 2019 10:33
@pgomulka
Copy link
Contributor Author

This is work in progress to integrate beats with new elasticsearch json logging

@elasticmachine
Copy link
Collaborator

Pinging @elastic/stack-monitoring

@ycombinator
Copy link
Contributor

Thanks for these samples, @pgomulka!

@@ -0,0 +1,55 @@
{"type": "main", "timestamp": "2019-01-10T10:38:14,990+0100", "level": "INFO", "component": "o.e.e.NodeEnvironment", "cluster.name": "distribution_run", "node.name": "node-0", "message": "using [1] data paths, mounts [[/ (/dev/disk1s1)]], net usable_space [187gb], net total_space [465.6gb], types [apfs]" }
{"type": "main", "timestamp": "2019-01-10T10:38:14,993+0100", "level": "INFO", "component": "o.e.e.NodeEnvironment", "cluster.name": "distribution_run", "node.name": "node-0", "message": "heap size [989.8mb], compressed ordinary object pointers [true]" }
{"type": "main", "timestamp": "2019-01-10T10:38:14,996+0100", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "distribution_run", "node.name": "node-0", "message": "node name [node-0], node ID [BboLkxHbQAW5IyqyqAfBLA]" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the node.id is known here (BboLkxHbQAW5IyqyqAfBLA). Any reason it couldn't be extracted into a JSON property?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good spot, but I don't think that with current ES infrastructure code I can access that value earlier. I need to wait for a internal clusterStateUpdate to pass that value to log4j code
Will confirm that

@ycombinator
Copy link
Contributor

In all the JSON logs there is a type property whose value is main, console, or rolling. What does this type mean?

@pgomulka
Copy link
Contributor Author

@ycombinator
this is that field that you can use to distinguish wich log line belongs to which log file in docker.
this is a bit inconsistent at the moment.
type should have only these values: server, deprecation , index_search_slowlog, index_indexing_slowlog
I will update these log samples with up to date logs later

@pgomulka
Copy link
Contributor Author

I have updated the logs according to latest config in a PR.

@ycombinator
Copy link
Contributor

@pgomulka If you get a chance, could you add some samples for search and indexing slowlogs as well?

@pgomulka
Copy link
Contributor Author

pgomulka commented Jan 29, 2019

@ycombinator sure - just uploaded (with stats field too)

@pgomulka
Copy link
Contributor Author

pgomulka commented Jul 2, 2019

closing as this was just a draft

@pgomulka pgomulka closed this Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Stack Monitoring Filebeat Filebeat in progress Pull request is currently in progress. module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants